package com.jy.web.diy.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.framework.base.BaseEntity;
import cn.afterturn.easypoi.excel.annotation.Excel;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;

import lombok.Getter;
import lombok.Setter;

/**
 * 字段表
 *
 * @author JuiceYan
 * @email JuiceYan@jy.com
 * @date 2018-12-22 20:55:40
 */
@ApiModel(value = "字段表")
@TableName("diy_attribute")
@Getter
@Setter
public class AttributeEntity extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    @ApiModelProperty(value = "主键")
@Excel(name = "主键")
    private Long id;
    /**
     * 属性编码
     */
    @ApiModelProperty(value = "属性编码")
@Excel(name = "属性编码")
    private String code;
    /**
     * 分类id
     */
    @ApiModelProperty(value = "分类id")
@Excel(name = "分类id")
    private Long categoryId;
    /**
     * 字段类型：0字符串，1数字。用来前台校验 ，查询条件，
     */
    @ApiModelProperty(value = "属性类型")
@Excel(name = "属性类型")
    private Integer type;
    /**
     * 属性默认值
     */
    @ApiModelProperty(value = "属性默认值")
@Excel(name = "属性默认值")
    @TableField(strategy = FieldStrategy.IGNORED)
    private String defaultValue;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
@Excel(name = "排序")
    private BigDecimal orderNum;
    /**
     * 控制该属性是否列表显示：null或1. 显示，0 影藏
     */
    @ApiModelProperty(value = "否列表显示")
@Excel(name = "否列表显示")
    private Integer isShow;
    /**
     * 是否必须：null或1 是，0 否
     */
    @ApiModelProperty(value = "是否必须")
@Excel(name = "是否必须")
    private Integer isMust;
    @ApiModelProperty(value = "帮助信息")
@Excel(name = "帮助信息")
    private String help;
}
